<%@page import="com.neiquan.backstage.event.EventService"%>
<%@page import="com.neiquan.backstage.pub.bsc.dao.po.Event"%>
<%@page import="java.util.List"%>
<%@page import="com.neiquan.backstage.common.CommonService"%>
<%@page import="com.neiquan.backstage.common.util.SpringContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
ApplicationContext appCtx = SpringContextUtils.getApplicationContext();
CommonService commonService = appCtx.getBean(CommonService.class);
String memberId1=request.getParameter("memberId");
int memberId=Integer.parseInt(memberId1);
 EventService eventService = appCtx.getBean(EventService.class);
List<Event> eventList = eventService.queryByMemberId(memberId);
pageContext.setAttribute("eventList", eventList);
pageContext.setAttribute("memberId", memberId);  
%> 
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>活动类表</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<link rel="stylesheet" href="css/base.css" />
	<link rel="stylesheet" href="css/main.css" />
</head>
<body bgcolor="#f0f0f0">
	<section class="mt">
 	<c:forEach var="event" items="${pageScope.eventList}">
		<section class="apply activesahre common_bg">
			<section class="activesahre_left fl pd">
				<a href="apply_event.jsp?id=${event.id}&memberId=${memberId}" class="activesahre_detail">
					活动标题:${event.name}
				</a>
			</section>
			<section class="fr">
				<a href="event_detail.jsp?id=${event.id}&memberId=${memberId}" class="btn apply_btn activesahre_btn">报名参加</a>
			</section>
		</section>
		<section class="line"></section>
		</c:forEach> 
	</section>
</body>
<script src="js/responsive.js"></script>
</html>
